A dynamic binary translation (DBT) processor has binary translation (BT) layer software that is located transparently between the hardware and operating system (OS)/application software space. The BT software translates and optimizes code, installs the translated code (translation) in a translation cache and executes the optimized translation in lieu of native (non-translated) code. The translation uses a host instruction set architecture (ISA) implemented in the processor, which may or may not be the same as a guest ISA, namely the ISA used by guest binaries that are being translated.
Since the cost of optimization is to be recouped by performance gains from executing optimized translations, hot guest code (with a high dynamic execution code) is typically optimized more than cold code. This hot guest code is identified via profiling of the program during execution until particular execution thresholds are reached, which invoke the translator. While profiling can identify the appropriate code for translation, it also imposes an overhead on performance. If this overhead is too high then its effect will not be recouped even by the performance improvements from translating and optimizing the code.